package com.xbongbong.workflow.model.impl;

import com.xbongbong.workflow.domain.dao.WorkflowTaskLogDao;
import com.xbongbong.workflow.domain.entity.WorkflowTaskLogEntity;
import com.xbongbong.workflow.model.WorkflowTaskLogModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author huguojun
 */
@Service("workflowTaskLogModel")
public class WorkflowTaskLogModelImpl implements WorkflowTaskLogModel {

    @Resource
    private WorkflowTaskLogDao workflowTaskLogDao;

    @Override
    public Integer insert(WorkflowTaskLogEntity entity) {
        return workflowTaskLogDao.insert(entity);
    }

    @Override
    public void insertBatch(List<WorkflowTaskLogEntity> list) {
        workflowTaskLogDao.insertBatch(list);
    }

    @Override
    public List<WorkflowTaskLogEntity> findEntitys(Map<String, Object> param) {
        return workflowTaskLogDao.findEntities(param);
    }

    @Override
    public Integer getEntitysCount(Map<String, Object> param) {
        return workflowTaskLogDao.getEntitiesCount(param);
    }

    @Override
    public List findEntitysWithoutSub(Map<String, Object> param) {
        return null;
    }

    @Override
    public Integer update(WorkflowTaskLogEntity entity) {
        return workflowTaskLogDao.update(entity);
    }

    @Override
    public WorkflowTaskLogEntity getByKey(Long key, String corpid) {
        return workflowTaskLogDao.getByKey(key, corpid);
    }

    @Override
    public WorkflowTaskLogEntity getByTaskid(Long taskId, String corpid) {
        return workflowTaskLogDao.getByTaskId(taskId, corpid);
    }

    @Override
    public void deleteByTaskIds(String corpid, List<Long> taskIds) {
        workflowTaskLogDao.deleteByTaskIds(corpid, taskIds);
    }

}
